package com.itheima.d1_properties;

import java.io.FileReader;
import java.io.FileWriter;
import java.util.Properties;


public class PropertiesTest3 {
    public static void main(String[] args) throws Exception{
        Properties properties = new Properties();
        properties.load(new FileReader("Day19-properties-xml-log\\src\\name.txt"));

        if(properties.containsKey("谢睿妍")){
            properties.setProperty("谢睿妍","18");
        }
        properties.store(new FileWriter("Day19-properties-xml-log\\src\\name.txt"),"success");

    }
}
